package com.itheima.order.service.impl;

import com.itheima.order.domain.Orders;
import com.itheima.order.mapper.OrderMapper;
import com.itheima.order.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;

/**
 * @Author fanYuLe
 * @Date 2023/3/25 15:57
 * @Blog blog.fanYuLe.net/996.mba
 * @Description:
 */
@Service
public class OrderServiceImpl implements OrderService {
    @Autowired
    private OrderMapper orderMapper;
    //创建一个订单
    @Override
    public void submit(Orders order) {
        //设置创建时间，设置修改时间
        order.setCreateTime(new Date());
        order.setUpdateTime(new Date());
        //insert into order () values ();
        orderMapper.insert(order);
    }
}

